## Compiler and flags
#CXX = g++
#CXXFLAGS = -std=c++17 -Wall -I. -I/usr/include/jsoncpp
#
## Source files and object files
#SRC = cloud.cpp bundle.cpp
#OBJ = cloud.o bundle.o
#
## Executable
#EXEC = cloud_program
#
## JSONCPP library (if using jsoncpp from system package)
#LIBS = -ljsoncpp -lstdc++fs
#
## Targets
#all: $(EXEC)
#
#$(EXEC): $(OBJ)
#	$(CXX) $(CXXFLAGS) -o $(EXEC) $(OBJ) $(LIBS)
#
#%.o: %.cpp
#	$(CXX) $(CXXFLAGS) -c $< -o $@
#
#clean:
#	rm -f $(EXEC) $(OBJ)
#
#run: $(EXEC)
#	./$(EXEC)
#
#.PHONY: all clean run
#
#
#
#CXX = g++
#CXXFLAGS = -std=c++11 -O2 -Wall
#
#TARGET = cloud
#
#SRCS = cloud.cpp bundle.cpp
#OBJS = $(SRCS:.cpp=.o)
#
#INCLUDES = -I.
#
#$(TARGET): $(OBJS)
#		$(CXX) $(CXXFLAGS) -o $@ $^
#
#%.o: %.cpp
#		$(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@
#
#.PHONY: clean
#
#clean:
#		rm -f $(OBJS) $(TARGET)
#
CXX = g++
CXXFLAGS = -std=c++11 -O2 -Wall

# 源文件和目标文件
SRCS = cloud.cpp bundle.cpp
OBJS = $(SRCS:.cpp=.o)

# 最终可执行文件名
TARGET = cloud

# JsonCpp 库路径（假设用系统默认安装的）
# 如果你手动安装了 jsoncpp，请改成实际路径
LIBS = -ljsoncpp -lstdc++fs

# 编译规则
$(TARGET): $(OBJS)
	$(CXX) $(CXXFLAGS) -o $(TARGET) $(OBJS) $(LIBS)

# 编译 .cpp 为 .o
%.o: %.cpp
	$(CXX) $(CXXFLAGS) -c $< -o $@

# 清理命令
clean:
	rm -f $(OBJS) $(TARGET)

